package com.example.design.strategy;

/**
 * 具体策略类 - 固定减价
 */
public class FixedDiscountStrategy implements DiscountStrategy {
    private double discount;
    public FixedDiscountStrategy(double discount) {
        this.discount = discount;
    }
    @Override
    public double applyDiscount(double price) {
        return price - discount;
    }
}
